{template 'common/header'}
{template 'nav'}
<form action="" method="post" class="form-horizontal" role="form">
<input type="hidden" value="{$basic_config['id']}"  name="basic_config_id">
<div class="panel panel-default">
	<div class="panel-heading">基本设置</div>	
	<div class="panel-body">
	<div class="tab-content">
	<div class="tab-pane  active" id="tab_basic">
		<div class="panel panel-default">
			<div class="panel-heading"></div>					
			<div class="panel-body">
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">公众号名称</span></label>
					<div class="col-sm-9">
						<input type="text"  class="form-control" name="mp_name" placeholder="公众号名称" value="{$basic_config['mp_name']}">
						<span class="help-block"><span class="label label-success">公众号名称</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">公众号二维码</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('mp_img', $basic_config['mp_img']);}
						<span class="help-block">公众号二维码</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">顶部logo图片</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('top_img', $basic_config['top_img']);}
						<span class="help-block">顶部logo图片 建议尺寸280x75</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">顶部滚动文字</label>
					<div class="col-sm-9">
						<textarea style="height:200px;" class="form-control" name="top_title" id="quit-tips" cols="70">{$basic_config['top_title']}</textarea>
						<span class="help-block">每条不超过20个字，多条请用#分隔，每10秒更新一次</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">顶部滚动文字字体大小 px</span></label>
					<div class="col-sm-9">
						<input type="text"  class="form-control" name="top_font_size" placeholder="" value="{$basic_config['top_font_size']}">
						<span class="help-block"><span class="label label-success">顶部滚动文字字体大小 单位像素</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">风格选择</span></label>
					<div class="col-sm-9">
						<select name="basic_style" class='form-control' onchange="doit(this.value)">
						 
							 {loop $styles $key $row}
							 <option   value="{php echo $key+1}"  {if $basic_config['basic_style']-$key==1}selected{/if}>风格{php echo $key+1}</option>
							 {/loop}
						</select>
						<span class="help-block"><img id="style_pic" style="width:256px;height:170px;margin:8px;" class="img-polaroid img-preview" src="{php echo $styles[$basic_config['basic_style']-1]}"  onerror="this.src='{$styles[34]}';"></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">pc背景图片</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('bg_img', $basic_config['bg_img']);}
						<span class="help-block">pc背景图片 建议标准 1440 * 828  注意: 上传此背景后风格背景将失效</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">pc背景视频</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_video('bg_vedio', $basic_config['bg_vedio']);}
						<span class="help-block">pc背景视频 格式为:mp4 建议用外链如http:://xxxx.mp4 注:视频背景优先级最高、次之为背景图片、再次之是默认风格</span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label">底部logo图片</label>
					<div class="col-sm-9">
						{php echo tpl_form_field_image('bottom_img', $basic_config['bottom_img']);}
						<span class="help-block">底部logo图片 建议尺寸165*50</span>
					</div>
				</div>
				<div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部参与活动引导词</label>
                    <div class="col-xs-12 col-sm-9">
                        {php echo tpl_ueditor('bottom_words',$basic_config['bottom_words'])}
									<span class="help-block">底部参与活动引导词</span>
                    </div>
                </div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2  control-label">是否开启背景音乐</label>
					<div class="col-sm-9 ">
						<label class="radio-inline">
							<input type="radio" name="bg_music_on" value="0" id="show_time_0" {if $basic_config['bg_music_on'] == '0'}checked="true"{/if} onclick="show_music1()"> 不开启
						</label>
						<label class="radio-inline">
							<input type="radio" name="bg_music_on" value="1" id="show_time_1"  {if $basic_config['bg_music_on'] == '1'}checked="true"{/if} onclick="show_music2()">开启
						</label>
					</div>
				</div>
				<div class="form-group show_music" style="{if $basic_config['bg_music_on']==0}display:none{/if}">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">背景音乐链接</span></label>
					<div class="col-sm-9">
						{php echo tpl_form_field_audio('bg_music',$basic_config['bg_music'])}
						<span class="help-block"><span class="label label-success">请填写带有http://的MP3格式的音乐链接</span></span>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2  control-label">是否显示星星效果</label>
					<div class="col-sm-9 ">
						<label class="radio-inline">
							<input type="radio" name="show_star" value="0" id="show_time_0" {if $basic_config['show_star'] == '0'}checked="true"{/if}> 不显示
						</label>
						<label class="radio-inline">
							<input type="radio" name="show_star" value="1" id="show_time_1"  {if $basic_config['show_star'] == '1'}checked="true"{/if}>显示
						</label>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2  control-label">是否显示落叶效果效果</label>
					<div class="col-sm-9 ">
						<label class="radio-inline">
							<input type="radio" name="show_leaf" value="0" onclick="show_leaf1()" {if $basic_config['show_leaf'] == '0'}checked="true"{/if}> 不显示
						</label>
						<label class="radio-inline">
							<input type="radio" name="show_leaf" value="1" onclick="show_leaf2()"  {if $basic_config['show_leaf'] == '1'}checked="true"{/if}>显示
						</label>
					</div>
				</div>
				<div class="form-group leaf_style" style="{if $basic_config['show_leaf']==0}display:none{/if}">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style="color:red">*</span><span class="label label-danger">落叶风格选择</span></label>
					<div class="col-sm-9">
						<select name="leaf_style" class='form-control'>
						 
							 {loop $leaf_styles $key $row}
							 <option   value="{php echo $key}"  {if $basic_config['leaf_style']==$key}selected{/if}>{$row}</option>
							 {/loop}
						</select>
						<span class="help-block">请选择任意一项</span>
					</div>
				</div>
			</div>
		</div>
		<div class="form-group col-sm-12">
			<input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
			<input type="hidden" name="token" value="{$_W['token']}" />
		</div>

	</div>
	</div>
	</div>
	</div>
	</form>
	<script>
function show_leaf1(){
	$(".leaf_style").hide();
}
function show_leaf2(){
	$(".leaf_style").show();
}
function show_music1(){
	$(".show_music").hide();
}
function show_music2(){
	$(".show_music").show();
}
  function doit(obj){
	  if(obj.length==1){
		 obj = '0'+obj;
	  }
	  obj = "{$_W['siteroot']}addons/meepo_xianchang/template/mobile/app/style/icon/0"+obj+'s.jpg';
	  document.getElementById("style_pic").src =obj;
  }



  </script> 
{template 'common/footer'}
